var express = require('express')
var router = express.Router()
var cors = require('cors')

var app = express()

app.use(cors());

router.get('/', function(req, res, next) {
  res.send('this site')
  res.end()
})
router.get('/login', cors(), function(req, res, next) {
  // res.send('do login');
  res.status(200).json({code: 0})
  res.end()
})
  
router.post('/login', cors(), function(req, res, next) {
  // res.send('do login post');
  res.status(200).json({code: 0})
  res.end()
})

module.exports = router;
